package com.litblue.api.fallback;


import com.litblue.api.client.GetArtWorkClient;
import com.litblue.starter.pojo.artwork.query.LitArtworkInfoQuery;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class GetArtWorkClientFallbackFactory implements FallbackFactory<GetArtWorkClient> {
    @Override
    public GetArtWorkClient create(Throwable cause) {
        return new GetArtWorkClient() {
            @Override
            public Integer queryUserHomeData(LitArtworkInfoQuery litArtworkInfoQuery) {
                return 0;
            }

            @Override
            public String getTestContent() {
                log.info("用户信息查询失败！",cause);
                return "我出现异常了,但是我处理了";
            }


        };
    }
}